package tgc.edu.yzy.entity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
public class User extends BmsRegister{
	private String mynumber;//电话号码
	private String sex;//性别
	private String position;//身份  学生 老师
	@JsonIgnore
	private List<BookRecord> bookrecord=new ArrayList<>();
	
	private Dapa dapa;
	
	@ManyToOne
	public Dapa getDapa() {
		return dapa;
	}
	public void setDapa(Dapa dapa) {
		this.dapa = dapa;
	}
	public String getMynumber() {
		return mynumber;
	}
	public void setMynumber(String mynumber) {
		this.mynumber = mynumber;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getPosition() {
		return position;
	}
	public void setPosition(String position) {
		this.position = position;
	}
	@OneToMany(cascade=CascadeType.ALL,mappedBy="user")
	public List<BookRecord> getBookrecord() {
		return bookrecord;
	}
	public void setBookrecord(List<BookRecord> bookrecord) {
		this.bookrecord = bookrecord;
	}
	
	
	
	
}
